The present invention relates generally to the field of version control systems for software development, and more particularly to automatic detection of potential merge errors in source code.
Source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, often as text. The source code of a program is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer by writing source code. The source code is often transformed by a compiler program into low-level machine code understood by the computer. The machine code may then be stored for execution at a later time. Alternatively, an interpreter can be used to analyze and perform the outcomes of the source code program directly on the fly. The source code which constitutes a program is often held in one or more text files stored on a computer's hard disk; these files may be carefully arranged into a directory tree, known as a source tree. Source code can also be stored in a database (as is common for stored procedures) or elsewhere.
In the field of software development, revision control is a practice that tracks and provides control over changes to collections of information such as source code, documentation, or configuration files. Within software development projects, development teams often leverage features of revision control systems to practice various forms of branching. Branching is a mechanism for isolation and parallel development of software applications. A “branch” is a line of development of an application or system, which exists independent of another line of development, yet shares a common history. A branch may be a copy of some existing version, release, task, component, etc., of an application. A branch may be, for example, a new release, a new task, a new architectural component, a new version, or another differentiating aspect of an application. Certain branches are created with the intention of eventually merging somewhere at a future time.
A merge or integration is an operation in which two sets of changes are applied to a file or set of files. Merging two files can be a delicate operation, and may only be possible if the data structure is simple, as in text files. The result of a merge of two image files may not result in an image file at all. A second developer checking in code needs to take care with the merge, to make sure that the changes are compatible and that the merge operation does not introduce its own logic errors within the files. For example, a branch is created, the code in the files is independently edited, and the updated branch is later incorporated into a single, unified trunk.